/**
 * Copyright(c) 2025 hbswxx.com, All Rights Reserved. Author: kouqiang Create date: 2025/5/30
 */
package cn.sw.syncdata.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * description: AI人像处理 主要保障小区编码跟设备编码在一块,其它的,按区间随机生成
 * live_face按e:/live_face/AIImg/yyyy/MM/dd/indexcode.jpg 生成
 *
 * @author kouqiang
 * @date 2025/5/30 17:20
 */
@Data
@EqualsAndHashCode(of = {"aismartmonitorindexcode", "collectiontime"})
public class Port {
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss");
    @TableId
    private Integer id;

    /**
     * 人脸抓拍信息标识
     */
    private String indexcode;

    /**
     * 人像采集方式代码-外键
     */
    private String collectionmodeindexcode = "01";

    /**
     * 年龄上线
     */
    private String upperage;

    /**
     * 年龄下线
     */
    private String lowerage;

    /**
     * 性别代码 1女2男0未知
     */
    private String genderindexcode;

    /**
     * 民族代码 空
     */
    private String nationindexcode = "";

    /**
     * 是否布控人员
     */
    private String controlpersonnel = "";

    /**
     * 是否关注人员
     */
    private String followpersonnel = "";

    /**
     * 采集设备信息标识 小区ID+#+厂家+#+通道号 mlcommunityid_51#HIVK#2
     */
    private String aismartmonitorindexcode;

    /**
     * 同行人数
     */
    private int numberpeers = 0;

    /**
     * 是否佩戴口罩-portrait_mask
     * 0未知 1未识别 2没戴 3戴
     */
    private String wearmask;

    /**
     * 左上角_中心点横坐标
     */
    private String leftmiddlehorizontal = "";

    /**
     * 左上角_中心点纵坐标
     */
    private String leftmiddlelongitudinal = "";

    /**
     * 右下角_中心点横坐标
     */
    private String rightmiddletransverse = "";

    /**
     * 右下角_中心点纵坐标
     */
    private String rightmiddlelongitudinal = "";

    /**
     * 着帽特征代码
     */
    private String hatindexcode = "";

    /**
     * 是否驾驶员-0：不是；1：是
     */
    private String driver = "";

    /**
     * 眼镜特征代码-portrait_glasses
     * 0	未知
     * 1	戴眼镜
     * 2	不戴眼镜
     */
    private String glassesindexcode;

    /**
     * 挎包特征代码
     */
    private String carryingbagindexcode = "";

    /**
     * 上身着装代码
     */
    private String topdressingindexcode = "";

    /**
     * 下身着装代码
     */
    private String lowerdressingindexcode = "";

    /**
     * 着鞋特征代码
     */
    private String shoesindexcode = "";

    /**
     * 上衣颜色
     */
    private String coatcolor = "";

    /**
     * 裤子颜色
     */
    private String trouserscolor = "";

    /**
     * 鞋子颜色
     */
    private String shoescolor = "";

    /**
     * 帽子颜色
     */
    private String hatcolor = "";

    /**
     * 口罩颜色
     */
    private String maskcolor = "";

    /**
     * 采集时间
     */
    private LocalDateTime collectiontime;

    /**
     * 小区编号
     */
    private String community_indexcode;

    /**
     * 表情特征代码-portrait_emotion
     * 0	未知
     * 1	戴眼镜
     * 2	微笑
     * 3	愤怒
     * 4	悲伤
     * 5	厌恶
     * 6	害怕
     * 7	惊讶
     * 8	正常
     * 9	大笑
     * 10	没戴眼镜
     * 11	高兴
     * 12	困惑
     * 13	尖叫
     * 14	戴太阳眼镜
     */
    private String emotionindexcode;

    /**
     * 胡须特征代码-portrait_beard
     * 0	未知
     * 1	未识别
     * 2	没胡子
     * 3	有胡子
     */
    private String beardindexcode;

    /**
     * 眼睛行为代码-portrait_eye
     * 0	未知
     * 1	未识别
     * 2	闭眼
     * 3	睁眼
     */
    private String eyeindexcode;

    /**
     * 嘴部行为代码-portrait_mouth
     * 0	未知
     * 1	未识别
     * 2	闭嘴
     * 3	张嘴
     */
    private String mouthindexcode;

    private LocalDateTime importtime;

    /***
     * description: 照片存放位置，按/liveface/Allmg/import的年/月/日/indexcode.jpg
     * @author kouqiang
     * @date 2025/6/3 09:26
     * @param null
     * @return: null
     */

    private String live_face;

    private Integer driver_id = 1;

    private String GDC_TYPE = "A";

    @Override
    public String toString() {
        //所有属性值，通过,号连接生成一条
        return indexcode + "," + collectionmodeindexcode + "," + upperage + "," + lowerage + "," + genderindexcode + "," +
                nationindexcode + "," + controlpersonnel + "," + followpersonnel + "," + aismartmonitorindexcode + "," +
                numberpeers + "," + wearmask + "," + leftmiddlehorizontal + "," + leftmiddlelongitudinal
                + "," + rightmiddletransverse + "," + rightmiddlelongitudinal + "," + hatindexcode + "," + driver + "," + glassesindexcode + "," +
                carryingbagindexcode + "," + topdressingindexcode + "," + lowerdressingindexcode + "," + shoesindexcode + "," +
                coatcolor + "," + trouserscolor + "," + shoescolor + "," + hatcolor + "," + maskcolor + "," + formatter.format(collectiontime) + "," +
                community_indexcode + "," + emotionindexcode + "," + beardindexcode + "," + eyeindexcode + "," + mouthindexcode
                + "," +formatter.format(importtime) + "," + live_face + "," + driver_id + "," + GDC_TYPE;
    }
}
